import React from "react";
import { Switch, Route, BrowserRouter } from "react-router-dom";
//引入组件
import Login from "./views/login";
import Index from "../src/views/index/index";
//引用私有组件
import PrivateRouter from "./components/privateRouter/index";
class App extends React.Component {
  render() {
    return (
      <BrowserRouter>
        <Switch>
          <Route exact component={Login} path="/"></Route>
          <PrivateRouter component={Index} path="/index"></PrivateRouter>
        </Switch>
      </BrowserRouter>
    );
  }
}

export default App;
